<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>while循环</title>
<script language="javascript">
var i=0;
var str="7";
while(i<4){
	str="0"+str;
	i++;
}
document.write(str);
</script>
</head>
<body>

</body>
</html>